package tk.djcrazy.instantmessage.hibernate;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class TransactionOperation extends HibernateDaoSupport{
	
	public void beginTransaction() {
		 getHibernateTemplate().getSessionFactory()
		.getCurrentSession().beginTransaction();
	}
	public void commitTransaction() {
		getHibernateTemplate().getSessionFactory()
		.getCurrentSession().getTransaction().commit();
	}
	public void rollbackTransaction() {
		getHibernateTemplate().getSessionFactory()
		.getCurrentSession().getTransaction().rollback();
	}
}
